﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Logic.BusinessLogic.SocialNetworks
{
	public class Data
	{

		public static Social.Facebook.GraphApi.Page GetFbPage(long id)
		{
			var result = Social.Facebook.GraphApi.GetPageById(id);
			return result.Content;
		}

		/// <summary>
		/// Retrieves the facebook page by its ubique name.
		/// NOTE: this works only with the Uinique name and not the display name
		/// </summary>
		/// <param name="name"></param>
		/// <returns></returns>
		public static Social.Facebook.GraphApi.Page GetFbPage(string name)
		{
			var result = Social.Facebook.GraphApi.GetPageByName(name);
			return result.Content;
		}

		public static List<Social.Facebook.GraphApi.Account> GetUserFbPages(string UserAccessToken)
		{
			var result = Social.Facebook.GraphApi.GetUserAccounts(UserAccessToken);
			return result.Content;
		}
	}
}
